/*
*Copyright (c) Nikhil Jain.
*Project ICARUS, communications and 
*artificial intelligence.
*/



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package javadrone.server.simulation;

//~--- non-JDK imports --------------------------------------------------------

import javadrone.server.DroneImpl;
import javadrone.server.StateChangeEvent;
import javadrone.server.listeners.StateChangeListener;

import javadrone.statedata.*;

/**
 *
 * @author Nikzzay
 */
public abstract class DroneInstructor implements Runnable, StateChangeListener {
    protected DroneImpl drone;
    private Thread      instructionThread;

    public DroneInstructor(DroneImpl drone) {
        this.drone        = drone;
        instructionThread = new Thread(this);
        drone.getCompleteState().addStateChangeListener(this);
    }

    public void start() {
        instructionThread.start();
    }

    public DroneImpl getDrone() {
        return drone;
    }

    @Override
    public void stateChanged(StateChangeEvent sce) {}
}


//~ Formatted by Jindent --- http://www.jindent.com
